
//API的声明层，也就是人们需要哪些功能？
public class Controller {
    private Service service = new Service();

    //查询余额
    public Wallet getWallet(int id) {
        Wallet wallet = service.getWallet(id);
        return wallet;
    }

    //充值
    public void deposit(int id, double n) {
        service.deposit(id, n);
    }

    //提现
    public void CashOut(int id, double n) {
        service.CashOut(id, n);
    }

    //支付，只是支付给商家，所以不用写目标的ID
    public void pay(int id, double n) {
        service.pay(id, n);
    }

    //查询流水
    public void showChcker() {
        System.out.println(service.getChecker());
    }

    //冻结部分钱款
    public void freeze(int id, double n) {
        service.freeze(id, n);
    }

    //申请贷款权限
    public void apply(int id, boolean e) {
        service.apply(id, e);
    }

    public void getApply(int id, double n) {
        service.getApply(id, n);
    }


}
